package com.hyper_yang._03_designpatterns.principles.demo7.after;

public class Car {
    private final Energy energy;
    private final Color color;

    public Car(Energy energy, Color color) {
        this.energy = energy;
        this.color = color;
    }

    public void drive() {
        System.out.println(color.color() + energy.type() + "的车");
    }
}
